<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "sys_setting".
 *
 * @property int $id
 * @property string $s_key 配置key
 * @property string $s_value 配置值
 * @property string $memo 备注
 * @property string $created_time 创建时间
 * @property string $updated_time 更新时间
 * @desc 系统全局配置表
 */
class SysSetting extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'sys_setting';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['created_time', 'updated_time'], 'safe'],
            [['s_key'], 'string', 'max' => 60],
            [['s_value'], 'string', 'max' => 1024],
            [['memo'], 'string', 'max' => 255],
            [['s_key'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            's_key' => 'S Key',
            's_value' => 'S Value',
            'memo' => 'Memo',
            'created_time' => 'Created Time',
            'updated_time' => 'Updated Time',
        ];
    }
}
